//###########文字标题组件###########
Comps.LiteralComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.title = config.title;
    this.remark = config.remark;
}

Comps.LiteralComp.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_title").html(that.title);
        $("#"+that.compId+"_remark").html(that.remark);
    }
    Utils.ajaxLoadComplate(that);
}
//###########标题列表组件###########
Comps.ListTitle = function(option) {
    this.compId = option.compId;
    this.needAsyncInit = option.needAsyncInit;
    this.imgSrc = option.imgSrc;
    this.defineUrl = option.defineUrl;
    this.defineWidth = option.defineWidth;
    this.defineHeight = option.defineHeight;
    this.alt = option.alt;
}

Comps.ListTitle.prototype.GetQueryString = function(name) {

    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;

}


Comps.ListTitle.prototype.init = function() {
    var that =this;

    if (this.needAsyncInit) {

        $("#"+that.compId+"_img").attr("src",that.imgSrc);

        if(that.defineWidth != 0){
            $("#"+that.compId+"_img").attr("width",that.defineWidth);
        }

        if(that.defineHeight != 0){
            $("#"+that.compId+"_img").attr("height",that.defineHeight);
        }

        $("#"+that.compId+"_img").attr("alt",that.alt);
    }

    that.bindSomeEvent();
    Utils.ajaxLoadComplate(that);
}


Comps.ListTitle.prototype.bindSomeEvent=function(){

    var that=this;

    $("#"+that.compId+"_a").click(function(){
        if(that.defineUrl != "" && that.defineUrl != null){
            window.open(ContextPath+that.defineUrl);
        }

    })
}
//===================================================二级标题组件=====================================================
Comps.SublitleComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.title = config.title;
    this.jumpName = config.jumpName;
    this.jumpUrl = config.jumpUrl;
}

Comps.SublitleComp.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_title").html(that.title);

        if (that.jumpUrl != '') {
            $("#"+that.compId+"_a").attr("href",that.jumpUrl).attr("target","_blank");
            if (that.jumpName != '') {
                $("#"+that.compId+"_a").html(that.jumpName);
            }
        } else {
            $("#"+that.compId+"_a").remove();
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================官网公司实力展示开始============================================
Comps.webSiteStrength = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imageListModels = config.imageListModels;

}

Comps.webSiteStrength.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#" + compId + "_div");
        var sonDiv = productEle.find(".webSiteStrength_div");
        productEle.html("");
        var imageList = that.imageListModels;
        for (var i = 0; i < imageList.length; ++i) {
            var  image = imageList[i];
            var newDiv = sonDiv.clone();
            var webSiteStrengthName = newDiv.find("#" +compId +"_name");
            var webSiteStrengthIntroduce = newDiv.find("#" +compId +"_introduce");
            var webSiteStrengthA = newDiv.find("#" +compId +"_a");
            var webSiteStrengthImg = newDiv.find("#" +compId +"_img");

            webSiteStrengthName.html(image.name);
            webSiteStrengthIntroduce.html(image.introduce);

            var jumpUrl = image.jumpUrl;
            if (jumpUrl== 'undifined'){
                webSiteStrengthA.prop("href", jumpUrl);
            }else {
                webSiteStrengthA.prop("href", "#");
            }
            webSiteStrengthImg.prop("src", image.imgSrc);
            productEle.append(newDiv);
        }

    }
    Utils.ajaxLoadComplate(that);
}
//====================================================官网公司实力展示结束============================================

//====================================================公司简介展示开始============================================
Comps.webIntroduction = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.webIntroductionList = config.webIntroductionList;

}

Comps.webIntroduction.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#" + compId + "_div");
        var sonDiv = $("#"+compId+"_divson");
        productEle.html("");
        var webIntroductionList = that.webIntroductionList;
        for (var i = 0; i < webIntroductionList.length; ++i) {
            var  introduction = webIntroductionList[i];
            var newDiv = sonDiv.clone();
            var introductionName = newDiv.find("#" +compId +"_name");
            var introductionIntroduce = newDiv.find("#" + compId +"_introduce");
            var introductionA = newDiv.find("#" + compId +"_a");
            var introductionImg = newDiv.find("#" + compId +"_img");

            introductionName.html(introduction.name);
            introductionIntroduce.html(introduction.introduce);

            var jumpUrl = introduction.jumpUrl;
            if (jumpUrl== 'undifined'){
                introductionA.prop("href", jumpUrl);
            }else {
                introductionA.prop("href", "#");
            }
            introductionImg.prop("src", introduction.imgSrc);
            productEle.append(newDiv);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================公司简介展示结束============================================

//====================================================频道标题组件=====================START=======================
Comps.channelTitleComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.title = config.title;
    this.remark = config.remark;
    this.defineUrl = config.defineUrl;
}

Comps.channelTitleComp.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_name").html(that.title);
        $("#"+that.compId+"_defineUrl").html(that.remark);
        $("#"+that.compId+"_defineUrl").attr("href", that.defineUrl);
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================频道标题组件=====================END=======================
//====================================================网点信息组件开始=================STRST========================
Comps.siteInfomation = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.steInfomationList = config.steInfomationList;

}

Comps.siteInfomation.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#"+compId+"_div");
        var sonDiv = $("#"+compId+"_divson");
        productEle.html("");
        var steInfomationList = that.steInfomationList;
        for (var i = 0; i < steInfomationList.length; ++i) {
            var  introduction = steInfomationList[i];
            var newDiv = sonDiv.clone();
            var introductionName = newDiv.find("#" +compId +"_name");
            var introductionIntroduce = newDiv.find("#" + compId +"_introduce");
            var introductionA = newDiv.find("#" + compId +"_a");
            var introductionImg = newDiv.find("#" + compId +"_img");

            introductionName.html(introduction.name);
            introductionIntroduce.html(introduction.introduce);

            var jumpUrl = introduction.jumpUrl;
            if (jumpUrl== 'undifined'){
                introductionA.prop("href", jumpUrl);
            }else {
                introductionA.prop("href", "#");
            }
            introductionImg.prop("src", introduction.imgSrc);
            productEle.append(newDiv);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================网点信息组件结束================END=========================
//====================================================战略合作组件开始=================STRST========================
Comps.cooperation = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.styleType = config.styleType;
    this.cooperationList = config.cooperationList;

}

Comps.cooperation.prototype.init = function() {
    debugger;
    var that =this;
    var compId= that.compId;
    if (this.needAsyncInit) {
        $("#"+compId+"_div").empty();
        if(0 == that.styleType){
            var compEleDiv = $("#"+compId+"_div1");
            var compEleDivClone = compEleDiv.clone();
            var compEleDivRow =  compEleDivClone.find("#"+compId+"_div_row").first();
            var compEleDiv2 =  compEleDivRow.find(".cooperation_div1").first();
            var compEleDiv2Clone = compEleDiv2.clone();
            compEleDivRow.empty();
            var cooperationList = that.cooperationList;
            if (cooperationList != null && cooperationList.length > 0) {
                for (var i = 0 ; i < cooperationList.length ; i++) {
                    var cooperation = cooperationList[i];
                    var compEle2Clone = compEleDiv2Clone.clone();
                    if (cooperation.jumpUrl != '') {
                        compEle2Clone.select(".band-company-a").first().attr("href",cooperation.jumpUrl)
                                .attr("target","_blank");
                    }else {
                        compEle2Clone.select(".band-company-a").first().attr("href","/")
                                .attr("target","_blank");
                    }
                    if (cooperation.imgSrc != '') {
                        compEle2Clone.select(".band-company-img").first().attr("src",cooperation.imgSrc);
                    }
                    compEleDivRow.append(compEle2Clone);
                }
            }
            $("#"+compId+"_div").append(compEleDivClone);
        } else {
            var compEleDiv = $("#"+compId+"_div2");
            var compEleDivClone = compEleDiv.clone();
            var compEleDivRow =  compEleDivClone.find("#"+compId+"_div_row2").first();
            var compEleDiv2 =  compEleDivRow.find(".cooperation_div2").first();
            var compEleDiv2Clone = compEleDiv2.clone();
            compEleDivRow.empty();
            var cooperationList = that.cooperationList;
            if (cooperationList != null && cooperationList.length > 0) {
                for (var i = 0 ; i < cooperationList.length ; i++) {
                    var cooperation = cooperationList[i];
                    var compEle2Clone = compEleDiv2Clone.clone();
                    if (cooperation.jumpUrl != '') {
                        compEle2Clone.select(".band-company-a2").first().attr("href",cooperation.jumpUrl)
                                .attr("target","_blank");
                    }else {
                        compEle2Clone.select(".band-company-a2").first().attr("href","/")
                                .attr("target","_blank");
                    }
                    if (cooperation.imgSrc != '') {
                        compEle2Clone.select(".band-company-img2").first().attr("src",cooperation.imgSrc);
                    }
                    compEleDivRow.append(compEle2Clone);
                }
            }
            $("#"+compId+"_div").append(compEleDivClone);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================战略合作组件结束================END=========================
//====================================================服务网点组件结束================START=========================
Comps.serviceSite = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.title = config.title;
    this.remark = config.remark;
    this.defineUrl = config.defineUrl;
}

Comps.serviceSite.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_name").html(that.title);
        $("#"+that.compId+"_a").html(that.remark);
        $("#"+that.compId+"_a").attr("href",that.defineUrl);
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================服务网点组件结束================END=========================
//====================================================企业荣誉组件开始=================STRST========================
Comps.enterpriseHonors = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.enterpriseHonorList = config.enterpriseHonorList;

}

Comps.enterpriseHonors.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var maxDiv = $("#" +compId + "_maxdiv");
        var minDiv = $("#" +compId + "_mindiv");

        var maxFirstDiv = maxDiv.find(".col-md-6");
        var minFirstDiv = minDiv.find(".col-md-3");

        maxDiv.html("");
        minDiv.html("");

        var enterpriseHonorList = that.enterpriseHonorList;
        for (var i = 0; i < enterpriseHonorList.length; ++i) {
            var  enterpriseHonor = enterpriseHonorList[i];

            var maxFirstDivClone = maxFirstDiv.clone();
            var minFirstDivClone = minFirstDiv.clone();
            var imgType = enterpriseHonor.type;
            if (imgType != "undefined" && imgType == "1"){
                var introductionA = maxFirstDivClone.find(".m-pic");
                var introductionImg = maxFirstDivClone.find(".wobble-horizontal");

                var jumpUrl = enterpriseHonor.jumpUrl;
                if (jumpUrl== 'undifined'){
                    introductionA.prop("href", jumpUrl);
                }else {
                    introductionA.prop("href", "#");
                }
                introductionImg.prop("src", enterpriseHonor.imgSrc);
                maxDiv.append(maxFirstDivClone);
            }else {
                var introductionA = minFirstDivClone.find(".m-pic");
                var introductionImg = minFirstDivClone.find(".wobble-vertical");

                var jumpUrl = enterpriseHonor.jumpUrl;
                if (jumpUrl== 'undifined'){
                    introductionA.prop("href", jumpUrl);
                }else {
                    introductionA.prop("href", "#");
                }
                introductionImg.prop("src", enterpriseHonor.imgSrc);
                minDiv.append(minFirstDivClone);
            }
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================企业荣誉组件结束================END=========================
//====================================================品牌实力组件开始=================STRST========================
Comps.brandPowerComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imageListModels = config.imageListModels;

}

Comps.brandPowerComp.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#" + compId + "_div");
        var sonDiv = productEle.find(".col-xs-6");
        productEle.html("");
        var imageListModels = that.imageListModels;
        for (var i = 0; i < imageListModels.length; ++i) {
            var  image = imageListModels[i];
            var newDiv = sonDiv.clone();
            var defineUrl = newDiv.find("#" + compId +"_defineUrl");
            var introductionImg = newDiv.find("#" + compId +"_img");
            var name = newDiv.find("#"+ compId +"_name");

            var jumpUrl = image.jumpUrl;
            if (jumpUrl== 'undifined'){
                defineUrl.prop("href", jumpUrl);
            }else {
                defineUrl.prop("href", "#");
            }
            introductionImg.prop("src", image.imgSrc);

            name.html(image.name);
            productEle.append(newDiv);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================品牌实力组件结束================END=========================
//====================================================招聘渠道组件开始=================STRST========================
Comps.recruitmentChannels = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imageListModels = config.imageListModels;

}

Comps.recruitmentChannels.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#" + compId +"_div");
        var sonDiv = productEle.find(".col-xs-6").first();
        productEle.html("");
        var imageListModels = that.imageListModels;
        for (var i = 0; i < imageListModels.length; ++i) {
            var  image = imageListModels[i];

            var newDiv = sonDiv.clone();

            if (1 == i) {
                newDiv.removeClass("col-md-push-2").addClass("col-md-push-3").addClass("checkbox0");
            }

            var title_a = newDiv.find("#" + compId +"_a");
            var title_img = newDiv.find("#" + compId +"_img");
            var title_name = newDiv.find("#" + compId +"_name");

            var jumpUrl = image.jumpUrl;
            if (jumpUrl== 'undifined'){
                title_a.prop("href", jumpUrl);
            }else {
                title_a.prop("href", "#");
            }
            title_img.prop("src", image.imgSrc);
            title_name.html(image.name);
            productEle.append(newDiv);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================招聘渠道组件结束================END=========================
//====================================================员工福利组件开始=================STRST========================
Comps.employeeBenefits = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imageListModelList = config.imageListModelList;

}

Comps.employeeBenefits.prototype.init = function() {
    var that =this;
    var compId= that.compId;
    if (this.needAsyncInit) {
        var productEle = $("#" + compId );
        var sonDiv = productEle.find(".col-xs-12").first();
        var sonDivMin = productEle.find(".col-xs-6").first();
        productEle.html("");
        var imageList = [];
        var imageListModels = that.imageListModelList;
        for (var i = 0; i < imageListModels.length; ++i) {
            var  image = imageListModels[i];
            var imgType = image.imgType;
            if (imgType != null && imgType == '1'){
                var newDiv = sonDiv.clone();

                var title_a = newDiv.find("#" + compId +"_a");
                var title_img = newDiv.find("#" + compId +"_img");
                var title_name = newDiv.find("#" + compId +"_name");
                var title_introduce = newDiv.find("#" + compId +"_introduce");

                var jumpUrl = image.jumpUrl;
                if (jumpUrl== 'undifined'){
                    title_a.prop("href", jumpUrl);
                }else {
                    title_a.prop("href", "#");
                }
                title_img.prop("src", image.imgSrc);
                title_name.html(image.name);
                title_introduce.html(image.introduce);
                productEle.append(newDiv);
            }else {
                imageList.push(imageListModels[i]);
            }
        }
        for (var i = 0; i < imageList.length; ++i) {
            var  imageMin = imageList[i];
            var newDivs = sonDivMin.clone();
            var title_a = newDivs.find("#" + compId +"_a_1");
            var title_img = newDivs.find("#" + compId +"_img_1");
            var title_name = newDivs.find("#" + compId +"_name_1");
            var title_introduce = newDivs.find("#" + compId +"_introduce_1");

            var jumpUrl = imageMin.jumpUrl;
            if (jumpUrl== 'undifined'){
                title_a.prop("href", jumpUrl);
            }else {
                title_a.prop("href", "#");
            }
            title_img.prop("src", imageMin.imgSrc);
            var name = imageMin.name;
            title_name.html(name);
            title_introduce.html(imageMin.introduce);

            productEle.append(newDivs);
        }
    }
    setTimeout(function () {
        AOS.init({
            disable: function () {
                var maxWidth = 992;
                return window.innerWidth < maxWidth;
            },
        });
    }, 0)
    Utils.ajaxLoadComplate(that);
}
//====================================================员工福利组件结束================END=========================
//====================================================社会责任组件开始=================STRST========================
Comps.socialTaskComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.socialTaskDTOList = config.socialTaskDTOList;

}

Comps.socialTaskComp.prototype.init = function() {
    var that =this;
    var compId= that.compId;
    if (this.needAsyncInit) {
        var productEle =  $("#" + compId + "_div");
        var compFirstLi = productEle.children().first();
        productEle.html("");

        var socialTaskList = that.socialTaskDTOList;
        for (var i = 0; i < socialTaskList.length; ++i) {
            var socialTask = socialTaskList[i];
            var compFirstLiClone = compFirstLi.clone();

            var socialTask_name = compFirstLiClone.find("#" + compId + "_name");
            var socialTask_time = compFirstLiClone.find("#" + compId + "_time");
            var socialTask_message = compFirstLiClone.find("#" + compId + "_message");
            var socialTask_option = compFirstLiClone.find("#" + compId + "_option");
            var socialTask_img = compFirstLiClone.find("#" + compId + "_img");

            var imgSrc = socialTask.imgSrc;
            socialTask_img.prop("src", imgSrc);
            var socialTaskName = '';
            if (socialTask.contentName != "undefined" && socialTask.contentName != '') {
                socialTaskName = socialTask.contentName;
            }
            socialTask_name.html(socialTaskName);

            var socialTaskTime = '';
            if (socialTask.contentTime != "undefined" && socialTask.contentTime != '') {
                socialTaskTime = socialTask.contentTime;
            }
            socialTask_time.html(socialTaskTime);

            var socialTaskMessage = '';
            if (socialTask.content != "undefined" && socialTask.content != '') {
                socialTaskMessage = socialTask.content;
            }
            socialTask_message.html(socialTaskMessage);

            var socialTaskOption = '/';
            if (socialTask.skipUrl != "undefined" && socialTask.skipUrl != '') {
                socialTaskOption = socialTask.skipUrl;
            }
            socialTask_option.prop("href",socialTaskOption);

            productEle.append(compFirstLiClone);
        }
        Utils.ajaxLoadComplate(that);
    }
}
//====================================================社会责任组件结束================END=========================
//====================================================责任切换组件开始=================STRST========================
Comps.channelSwitchComp = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.channelSwitchDTOList = config.channelSwitchDTOList;

}

Comps.channelSwitchComp.prototype.init = function() {
    var that =this;
    var compId= that.compId;
    if (this.needAsyncInit) {
        var productEle = $("#" + compId + "_div");
        var compFirstLi = productEle.children().first();
        productEle.html("");

        var channelSwitchList = that.channelSwitchDTOList;
        for (var i = 0; i < channelSwitchList.length; ++i) {
            var channelSwitch = channelSwitchList[i];
            var compFirstLiClone = compFirstLi.clone();

            var channelSwitch_name = compFirstLiClone.find("#" + compId + "_name");
            var channelSwitch_time = compFirstLiClone.find("#" + compId + "_time");
            var channelSwitch_message = compFirstLiClone.find("#" + compId + "_message");
            var channelSwitch_option = compFirstLiClone.find("#" + compId + "_option");
            var channelSwitch_img = compFirstLiClone.find("#" + compId + "_img");

            var imgSrc = channelSwitch.imgSrc;
            channelSwitch_img.prop("src", imgSrc);
            var channelSwitchName = '';
            if (channelSwitch.contentName != "undefined" && channelSwitch.contentName != '') {
                channelSwitchName = channelSwitch.contentName;
            }
            channelSwitch_name.html(channelSwitchName);

            var channelSwitchTime = '';
            if (channelSwitch.contentTime != "undefined" && channelSwitch.contentTime != '') {
                channelSwitchTime = channelSwitch.contentTime;
            }
            channelSwitch_time.html(channelSwitchTime);

            var channelSwitchMessage = '';
            if (channelSwitch.content != "undefined" && channelSwitch.content != '') {
                channelSwitchMessage = channelSwitch.content;
            }
            channelSwitch_message.html(channelSwitchMessage);

            var channelSwitchOption = '/';
            if (channelSwitch.skipUrl != "undefined" && channelSwitch.skipUrl != '') {
                channelSwitchOption = channelSwitch.skipUrl;
            }
            channelSwitch_option.prop("href",channelSwitchOption);

            productEle.append(compFirstLiClone);
        }
        Utils.ajaxLoadComplate(that);
    }
    that.bindEvent();
}

Comps.channelSwitchComp.prototype.bindEvent=function(){
    $('.band_slider .flexslider').flexslider({
        controlsContainer:".slider_fullscreen_control",
        animation: "slide",
        animationLoop: false,
        slideshow: false,
        pauseOnAction: true,
        pauseOnHover: false,
        animationDuration: 600,
        directionNav: true,
        start: function () {
            var flexH = $('.flexslider .m-pic').height();
           /* console.log(flexH);*/
            $('.band-solid-bottom').height(flexH-64);
        }
    })

    $(window).resize(function () {
        var flexH = $('.flexslider .m-pic').height();
        $('.band-solid-bottom').height(flexH-64);

    })
}
//====================================================责任切换组件结束================END=========================
//====================================================工作机会Baner结束================START=========================
Comps.workBanner = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imgSrc = config.imgSrc;
}

Comps.workBanner.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_img").prop("src", that.imgSrc);
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================工作机会Baner结束================END=========================
//====================================================品牌介绍地图结束================START=========================
Comps.mapSection = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.imgSrc = config.imgSrc;
    this.title = config.title;
}

Comps.mapSection.prototype.init = function() {
    var that =this;
    if (this.needAsyncInit) {
        $("#"+that.compId+"_img").prop("src", that.imgSrc);
        $("#"+that.compId+"_title").html(that.title);
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================品牌介绍地图结束================END=========================

//====================================================公司理念组件开始=================STRST========================
Comps.companyDirection = function(config){
    this.compId = config.compId;
    this.needAsyncInit = config.needAsyncInit;
    this.companyDirectionList = config.companyDirectionList;

}

Comps.companyDirection.prototype.init = function() {
    var that =this;
    var compId= that.compId;

    if (this.needAsyncInit) {
        var productEle = $("#" + compId +"_div");
        var sonDiv = productEle.find(".col-xs-12").first();
        productEle.html("");
        var companyDirectionList = that.companyDirectionList;
        for (var i = 0; i < companyDirectionList.length; ++i) {
            var  companyDirection = companyDirectionList[i];

            var newDiv = sonDiv.clone();

            var title_logo = newDiv.find("#" + compId +"_logo");
            var title_img = newDiv.find("#" + compId +"_img");
            var title_title = newDiv.find("#" + compId +"_title");
            var title_describe = newDiv.find("#" + compId +"_describe");

            var title = companyDirection.title;
            if (title == 'undifined'){
                title_title.html("");
            }else {
                title_title.html(title);
            }
            var describe = companyDirection.describe;
            if (describe == 'undifined'){
                title_describe.html("");
            }else {
                title_describe.html(describe);
            }
            title_logo.prop("src", companyDirection.logoSrc);
            title_img.prop("src", companyDirection.imgSrc);

            productEle.append(newDiv);
        }
    }
    Utils.ajaxLoadComplate(that);
}
//====================================================公司理念组件结束================END=========================